<!--#INCLUDE FILE="config.asp"-->

<%
action = request("Action")
startdate = request("startdate")
roomsize = request("roomsize")

		sqlstring = "SELECT Top 1 *  "
		sqlstring = sqlstring & " FROM dbo.Rates "
		sqlstring = sqlstring & " WHERE StartDate <= '"& startdate & "' AND FinishDate >= '"&startdate&"'"
		
		set objConnect = server.createObject("ADODB.Connection")

		objConnect.Open conStr

		set TblTemp = server.createobject("ADODB.Recordset")
				
			TblTemp.Open Sqlstring, objConnect
			
			If not TblTemp.EOF Then
				lstRate = TblTemp("ListRate")
				offerDescription = TblTemp("OfferDescription")
				offerRate = TblTemp("OfferRate")
			End if
			If (IsNull(lstRate)) then 
				lstRate = ""
			end if
			If (IsNull(offerRate)) then 
				offerRate = ""
			end if
		output = "<td width='33%'>"
		output = output + "<label>Tarifa :</label><br />"
		output = output + "<input type='text' value="&lstRate&" />"
		output = output + "</td>"
		output = output + "<td width='33%'>"
		output = output + "<label>Tarifa con Descuento :</label><br />"
		output = output + "<input type='text' value="&offerRate&" />"
		output = output + "</td>"
		output = output + "<td width='33%'>"
		output = output + "<input id='submit_divA' type='button' value='Ver Tarifas'/>"
		output = output + "</td>"

	
	response.write(output)
%>